package com.hxzy.system.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxzy.common.core.domain.entity.SysRole;
import com.hxzy.system.domain.SysOperLog;
import com.hxzy.system.domain.dto.SysOperLogSearchDTO;
import com.hxzy.system.mapper.SysOperLogMapper;
import com.hxzy.system.service.ISysOperLogService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 操作日志记录
 */
@Service
public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper,SysOperLog>  implements ISysOperLogService {

    @Override
    public void insertOperlog(SysOperLog operLog) {
         this.baseMapper.insertOperlog(operLog);
    }

    @Override
    public int deleteOperLogByIds(Long[] operIds) {
        return this.deleteOperLogByIds(operIds);
    }



    @Override
    public void cleanOperLog() {
         this.baseMapper.cleanOperLog();
    }

    @Override
    public IPage<SysOperLog> search(SysOperLogSearchDTO sysOperLogSearchDTO) {
        IPage<SysRole> page= PageDTO.of(sysOperLogSearchDTO.getPageNum(),sysOperLogSearchDTO.getPageSize());
        return  this.baseMapper.search(page,sysOperLogSearchDTO);

    }

    @Override
    public List<SysOperLog> searchExport(SysOperLogSearchDTO sysOperLogSearchDTO) {
      return  this.baseMapper.searchExport(sysOperLogSearchDTO);
    }
}

